<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          
 <html xmlns="http://www.w3.org/1999/xhtml" 
 	   xmlns:ui="http://java.sun.com/jsf/facelets"
 	   xmlns:f="http://java.sun.com/jsf/core" 
	   xmlns:h="http://java.sun.com/jsf/html"
	   xmlns:t="http://myfaces.apache.org/tomahawk">
 	<body>
 	<!-- common menu for all pages -->
 	<ui:composition >
		<t:panelGrid  columns="2">
			<t:outputText value="Test case summary" /> 
			<t:outputText />
			<t:panelGroup>
				<t:inputText id="summary" label="summary" value="#{manageTestCasesBean.summary}" required="true" >
					<f:validateLength minimum="2" maximum="25" />
				</t:inputText>
				<t:message for="summary" errorStyle="color:red; text-decoration:overline" />
			</t:panelGroup>	
			<t:outputText />
			<t:outputText value="Environment" />
			<t:outputText />
			<t:panelGroup>
				<t:inputTextarea id="environment" label="environment" value="#{manageTestCasesBean.environment}" >
					<f:validateLength minimum="0" maximum="500" />
				</t:inputTextarea>
				<t:message for="environment" errorStyle="color:red; text-decoration:overline" />
			</t:panelGroup>
			<t:outputText />
			<t:outputText value="Precondition steps" />
			<t:outputText />
			<t:panelGroup>
				<t:inputTextarea id="pre_steps" label="pre_steps" value="#{manageTestCasesBean.preSteps}" >
					<f:validateLength minimum="0" maximum="500" />
				</t:inputTextarea>
				<t:message for="pre_steps" errorStyle="color:red; text-decoration:overline" />
			</t:panelGroup>	
			<t:outputText />
			<t:outputText value="Description" />
			<t:outputText value="" />
			<t:panelGroup>
				<t:inputTextarea id="description" label="description" value="#{manageTestCasesBean.description}" >
					<f:validateLength minimum="0" maximum="500" />
				</t:inputTextarea>
				<t:message for="description" errorStyle="color:red; text-decoration:overline" />
			</t:panelGroup>	
			<t:outputText />
			<t:outputText value="Expected result" />
			<t:outputText />
			<t:panelGroup>	
				<t:inputTextarea id="expected_result" label="expected_result" value="#{manageTestCasesBean.expectedResult}" >
					<f:validateLength minimum="0" maximum="500" />
				</t:inputTextarea>
				<t:message for="expected_result" errorStyle="color:red; text-decoration:overline" />
			</t:panelGroup>	
			<t:outputText />
			<t:outputText value="Execution time" />
			<t:outputText />
			<t:panelGroup>
				<t:inputText id="execution_time"  label="execution_time" value="#{manageTestCasesBean.executionTime}" >
					<f:validateDoubleRange minimum="0"  />
				</t:inputText>
				<t:message for="execution_time" errorStyle="color:red; text-decoration:overline" />
			</t:panelGroup>	
			<t:outputText />
			<t:outputText value="Priority" />
			<t:outputText />
			<t:selectOneMenu value="#{manageTestCasesBean.searchWordPriority}" >
				<f:selectItems value="#{manageTestCasesBean.priorityList}" />	
			</t:selectOneMenu>	
			<t:outputText />
			<t:outputText value="Type" />
			<t:outputText />
			<t:selectOneMenu value="#{manageTestCasesBean.searchWordType}" >
				<f:selectItems value="#{manageTestCasesBean.typeList}" />	
			</t:selectOneMenu>
			<t:outputText />
			<t:outputText value="Status" />
			<t:outputText />
			<t:selectOneMenu value="#{manageTestCasesBean.searchWordStatus}" >
				<f:selectItems value="#{manageTestCasesBean.statusList}" />	
			</t:selectOneMenu>
			<t:outputText />
			<t:outputText value="Specification" />
			<t:outputText />
			<t:selectOneMenu value="#{manageTestCasesBean.searchWordSpec}" >
				<f:selectItems value="#{manageTestCasesBean.specList}" />	
			</t:selectOneMenu>
			<t:outputText />
			<t:outputText value="Enter bugID" />
			<t:panelGroup>
				<t:inputText id="bugId" label="bugID" value="#{manageTestCasesBean.searchWordBugID}" >
					<f:validateDoubleRange minimum="1"  />	
				</t:inputText>
				<t:message for="bugId" errorStyle="color:red; text-decoration:overline" />
			</t:panelGroup>
			<t:commandButton action="#{manageTestCasesBean.createTestCase}" value="create" />
			<t:commandButton action="casesList" value="cancel" immediate="true"/>
		</t:panelGrid>
   </ui:composition>
	</body>
 </html>